package com.netease.b.b.a;

import android.os.Bundle;
import com.netease.b.b.e.f;
import com.netease.pris.a.i;
import java.net.URLDecoder;
import java.security.MessageDigest;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.apache.http.NameValuePair;
import org.json.JSONException;
import org.json.JSONObject;

public class b extends com.netease.b.b.e.a
{
  public static final String a = "139600";
  public static final String b = "4819b81e2f5a467baaf9d6308c17c784";
  public static final String d = "50126a537a4d4357bdffb59ddc8eb93a";
  private static final String e = "http://api.renren.com/restserver.do";
  private static final String f = "https://graph.renren.com";
  private static b g;

  public b()
  {
    super("4819b81e2f5a467baaf9d6308c17c784", "50126a537a4d4357bdffb59ddc8eb93a");
  }

  public static b a()
  {
    if (g == null)
      g = new b();
    return g;
  }

  private String a(int paramInt, String paramString)
  {
    switch (paramInt)
    {
    default:
      if (!i.e(paramString))
        break;
      paramString = "未知错误";
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 8:
    case 100:
    case 101:
    case 103:
    case 104:
    case 107:
    case 110:
    case 200:
    case 450:
    case 452:
    case 453:
    case 2000:
    case 2001:
    case 2002:
    case 10200:
    case 10300:
    case 10301:
    case 10302:
    case 10303:
    case 10304:
    case 10305:
    case 10306:
    case 10307:
    case 10308:
    case 10309:
    case 10310:
    case 10311:
    case 10312:
    case 10313:
    case 10400:
    case 10401:
    case 10402:
    case 10500:
    case 10501:
    case 10502:
    case 10503:
    case 10504:
    case 10505:
    case 10506:
    case 10507:
    case 10508:
    case 10509:
    case 10510:
    case 10511:
    case 10512:
    case 10513:
    case 10514:
    case 10516:
    case 10517:
    case 10518:
    case 10600:
    case 10601:
    case 10602:
    case 10604:
    case 10606:
    case 10607:
    case 10609:
    case 10610:
    case 10615:
    case 10616:
    case 10617:
    case 10618:
    case 10619:
    case 10621:
    case 10700:
    case 10701:
    case 10702:
    case 10703:
    case 10704:
    case 10709:
    case 10711:
    case 10712:
    case 10713:
    case 10714:
    case 10716:
    case 10800:
    case 10801:
    case 10802:
    case 10803:
    case 10804:
    case 10900:
    case 10901:
    case 20000:
    case 20200:
    case 20201:
    case 20202:
    case 20203:
    case 20204:
    case 20205:
    case 20207:
    case 20213:
    case 20300:
    case 20301:
    case 20302:
    case 20303:
    case 20304:
    case 20305:
    case 20306:
    case 20307:
    case 20308:
    case 1001:
    case 1002:
    case 1003:
    case 1004:
    case 1005:
    case 1006:
    case 1007:
    case 1008:
    case 1009:
    case 1010:
    case 1011:
    case 1012:
    case 1013:
    }
    while (true)
    {
      return paramString;
      paramString = "抱歉,服务临时不可用";
      continue;
      paramString = "调用数据服务出现异常，请稍候再试";
      continue;
      paramString = "请求未知方法";
      continue;
      paramString = "应用已达到设定的请求上限";
      continue;
      paramString = "请求来自未经授权的IP地址";
      continue;
      paramString = "服务器繁忙，请稍后再试";
      continue;
      paramString = "请求包含无效参数";
      continue;
      paramString = "提交的api_key不属于任何已知的应用";
      continue;
      paramString = "必须是POST提交";
      continue;
      paramString = "sig认证失败";
      continue;
      paramString = "无效的文本内容";
      continue;
      paramString = "所操作资源已经不存在";
      continue;
      paramString = "没有权限进行操作";
      continue;
      paramString = "当前用户的sessionKey过期";
      continue;
      paramString = "Session key 无效";
      continue;
      paramString = "调用此方法时，session key 是一个必须的参数";
      continue;
      paramString = "没有传入access_token参数";
      continue;
      paramString = "access_token无效";
      continue;
      paramString = "access_token过期";
      continue;
      paramString = "当前请求缺少必需参数";
      continue;
      paramString = "日志所有者不存在";
      continue;
      paramString = "日志所有者的用户ID是必须的参数";
      continue;
      paramString = "日志的ID是必须参数";
      continue;
      paramString = "你没有权限阅读此篇日志";
      continue;
      paramString = "发表的日志可能含有非法信息";
      continue;
      paramString = "日志标题和内容不能为空或不能过长";
      continue;
      paramString = "删除日志时发生未知异常";
      continue;
      paramString = "日志评论的ID是必须的参数";
      continue;
      paramString = "删除日志评论时发生未知异常";
      continue;
      paramString = "评论超过了规定的次数";
      continue;
      paramString = "日志标题为必须参数";
      continue;
      paramString = "日志正文为必须参数";
      continue;
      paramString = "密码错误";
      continue;
      paramString = "此日志不允许分享";
      continue;
      paramString = "状态更新过于频繁";
      continue;
      paramString = "状态字数超过限定长度";
      continue;
      paramString = "状态的内容含有非法字符";
      continue;
      paramString = "照片所有者的用户ID是必须的参数";
      continue;
      paramString = "照片所有者不存在";
      continue;
      paramString = "照片未知异常";
      continue;
      paramString = "相册ID是必须的参数";
      continue;
      paramString = "相册不存在";
      continue;
      paramString = "相册所有者不存在";
      continue;
      paramString = "你没有权限查看此相册";
      continue;
      paramString = "照片的ID是必须的参数";
      continue;
      paramString = "照片不存在";
      continue;
      paramString = "你没有权限评论此照片";
      continue;
      paramString = "你发表的评论含有违禁信息";
      continue;
      paramString = "无效的照片格式,照片的宽和高不能小于50,照片的宽与高的比不能小于1:3";
      continue;
      paramString = "相册空间不足";
      continue;
      paramString = "盗用的照片";
      continue;
      paramString = "相册名为必须的参数";
      continue;
      paramString = "密码错误";
      continue;
      paramString = "此相册或照片不允许分享";
      continue;
      paramString = "删除失败，可能是相册或照片不存在，或者是不允许删除";
      continue;
      paramString = "此接口的调用超过了限定的次数";
      continue;
      paramString = "Feed标题模板是无效的";
      continue;
      paramString = "显示内容应该在100个字符之内";
      continue;
      paramString = "title_data 参数不是一个有效的JSON 格式数组";
      continue;
      paramString = "只能包含case a>或者case xn:name>标签";
      continue;
      paramString = "内容部分是可选的，内容部分的最终显示的字符数应该控制在200个以内";
      continue;
      paramString = "传入title_data或者Feed标题模板中含有非法标签";
      continue;
      paramString = "传入内容中含有非法标签";
      continue;
      paramString = "Feed内容模板中定义的变量和JSON数组中的定义不匹配";
      continue;
      paramString = " Feed标题模板中定义的变量和title_data JSON数组中的定义不匹配";
      continue;
      paramString = "根据传入的模板号，没有找到对应的模板";
      continue;
      paramString = "无效的URL";
      continue;
      paramString = "参数不是一个有效的JSON 格式数组";
      continue;
      paramString = "feed_Token过期";
      continue;
      paramString = "XNML片段格式不符合要求，传入文本信息错误";
      continue;
      paramString = "to_ids 参数的格式不符合要求";
      continue;
      paramString = "发送者已超过当天发送配额，此接口调用过于频繁，请明天再试";
      continue;
      paramString = " AppToUser已超过发送配额";
      continue;
      paramString = "通知发送过快";
      continue;
      paramString = "根据传入的模板号，没有找到对应的模板";
      continue;
      paramString = "email内容中只能包含case a>或者case xn:name>标签";
      continue;
      paramString = "email标题只能是文本，不能包括其它标签";
      continue;
      paramString = "email模板中的xnml语法有问题";
      continue;
      paramString = "body_data参数不是一个有效的JSON 格式数组";
      continue;
      paramString = "接收者当天接收的通知量超过配额";
      continue;
      paramString = "传递订单号已失效，无法获取到token";
      continue;
      paramString = " 无效的订单号 (小于零)";
      continue;
      paramString = "消费金额无效:不支持大笔消费金额>1000或者小于零";
      continue;
      paramString = "人人网支付平台应用资料审核未通过，没有使用平台的资格";
      continue;
      paramString = "该订单不存在";
      continue;
      paramString = "站内信不存在";
      continue;
      paramString = "站内信的发送超过了限制";
      continue;
      paramString = "可能有违禁信息";
      continue;
      paramString = "需要用户授权";
      continue;
      paramString = "需要用户授予status_update权限";
      continue;
      paramString = "需要用户授予email权限";
      continue;
      paramString = "需要用户授予publish_stream权限";
      continue;
      paramString = "需要用户授予read_stream权限";
      continue;
      paramString = "需要用户授予photo_upload权限";
      continue;
      paramString = "需要用户授予offline_access权限";
      continue;
      paramString = "需要用户授予feed_publish权限";
      continue;
      paramString = "不是已开放的公共主页";
      continue;
      paramString = "该用户不是此公共主页的管理员";
      continue;
      paramString = "该公共主页不存在";
      continue;
      paramString = "该公共主页关闭了留言或评论";
      continue;
      paramString = "只有粉丝才能留言或评论";
      continue;
      paramString = "你没有权限留言，请联系管理员";
      continue;
      paramString = "管理员只能回复，不能留言";
      continue;
      paramString = "此接口不允许公共主页调用";
      continue;
      paramString = "操作太过频繁";
      continue;
      paramString = "输入的帐号或者密码不对";
      continue;
      paramString = "当前登录的ip地址处于封禁状态";
      continue;
      paramString = "用户不存在";
      continue;
      paramString = "帐号处于未激活的状态";
      continue;
      paramString = "帐号处于被封禁的状态";
      continue;
      paramString = "帐号处于注销的状态";
      continue;
      paramString = "登录服务暂时不可用，请重试";
      continue;
      paramString = "请检查传入的api_key参数是否正确";
      continue;
      paramString = "提交必须是Post方式";
      continue;
      paramString = "帐号存在安全问题";
      continue;
      paramString = "用户输入不合法";
      continue;
      paramString = "产品处于测试阶段，请耐心等待";
      continue;
      paramString = "您的账号存在异常行为";
    }
  }

  public static String a(Bundle paramBundle)
  {
    if (paramBundle == null);
    StringBuilder localStringBuilder;
    for (String str1 = ""; ; str1 = localStringBuilder.toString())
    {
      return str1;
      localStringBuilder = new StringBuilder();
      Iterator localIterator = paramBundle.keySet().iterator();
      int i = 1;
      if (!localIterator.hasNext())
        continue;
      String str2 = (String)localIterator.next();
      if (i != 0)
        i = 0;
      while (true)
      {
        localStringBuilder.append(str2 + "=" + paramBundle.getString(str2));
        break;
        localStringBuilder.append("&");
      }
    }
  }

  private static String a(byte[] paramArrayOfByte)
  {
    try
    {
      MessageDigest localMessageDigest = MessageDigest.getInstance("MD5");
      StringBuffer localStringBuffer = new StringBuffer();
      for (int k : localMessageDigest.digest(paramArrayOfByte))
      {
        localStringBuffer.append(Integer.toHexString((k & 0xF0) >>> 4));
        localStringBuffer.append(Integer.toHexString(k & 0xF));
      }
      String str = localStringBuffer.toString();
      return str;
    }
    catch (Exception localException)
    {
    }
    throw new RuntimeException(localException.getMessage(), localException);
  }

  public static String c(String paramString)
  {
    Object localObject;
    if ((paramString == null) || (paramString.trim().length() < 1))
      localObject = null;
    while (true)
    {
      return localObject;
      try
      {
        String str = a(paramString.getBytes("UTF-8"));
        localObject = str;
      }
      catch (Exception localException)
      {
      }
    }
    throw new RuntimeException(localException.getMessage(), localException);
  }

  public int a(com.netease.b.b.e.d paramd)
  {
    b("4819b81e2f5a467baaf9d6308c17c784", "50126a537a4d4357bdffb59ddc8eb93a");
    return a(new d(), paramd);
  }

  public int a(String paramString1, String paramString2, String paramString3, com.netease.b.b.e.d paramd)
  {
    return a(a.a(paramString1, paramString2, paramString3), paramd);
  }

  public String a(String paramString)
  {
    return "http://api.renren.com/restserver.do" + paramString;
  }

  public void a(List paramList, String paramString)
  {
    paramList.add(new com.netease.c.b.b("access_token", URLDecoder.decode(b().d)));
    paramList.add(new com.netease.c.b.b("method", paramString));
    paramList.add(new com.netease.c.b.b("v", "1.0"));
    paramList.add(new com.netease.c.b.b("call_id", String.valueOf(System.currentTimeMillis())));
    paramList.add(new com.netease.c.b.b("format", "JSON"));
    StringBuffer localStringBuffer = new StringBuffer();
    Collections.sort(paramList);
    Iterator localIterator = paramList.iterator();
    while (localIterator.hasNext())
    {
      com.netease.c.b.b localb = (com.netease.c.b.b)localIterator.next();
      localStringBuffer.append(localb.getName());
      localStringBuffer.append("=");
      localStringBuffer.append(localb.getValue());
    }
    localStringBuffer.append("50126a537a4d4357bdffb59ddc8eb93a");
    com.netease.g.b.e("prepareParams", localStringBuffer.toString());
    String str = c(localStringBuffer.toString());
    com.netease.g.b.e("prepareParams", str);
    paramList.add(new com.netease.c.b.b("sig", str));
  }

  public f b(String paramString)
  {
    f localf;
    if (paramString == null)
      localf = new f(5, -5, null, null);
    while (true)
    {
      return localf;
      com.netease.g.b.e("RenrenService", paramString);
      localf = new f(5);
      try
      {
        JSONObject localJSONObject = new JSONObject(paramString);
        localf.h = localJSONObject.optInt("error_code");
        localf.j = localJSONObject.optString("error_msg");
        localf.i = String.valueOf(localf.h);
        localf.j = a(localf.h, localf.i);
      }
      catch (JSONException localJSONException)
      {
        localf.h = -1;
        localf.j = f.a(-1);
        localJSONException.printStackTrace();
      }
    }
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.b.b.a.b
 * JD-Core Version:    0.6.0
 */